from python_learn.HeroFight import Police, Timo


class HeroFactoty:
    def createHero(self, hero_name):
        """
         创建一个英雄
        :param hero_name: 英雄的名字
        :return: 返回英雄的实例对象
        """
        if hero_name == "police":
            return Police()
        elif hero_name == "timo":

            return Timo()
        else:
             raise Exception("此英雄没有在英雄工厂内,请耐心等待!!!")







